// 饼图

var dom = document.getElementById("container")
var myChart = echarts.init(dom)
option = null
option = {
    tooltip: {
        formatter: "{b} : {d}%"
    },
    series: [
        {
            type: 'pie',
            radius : '55%',
            center: ['50%', '60%'],
            data:[
                {value:130, name:'6k-8k'},
                {value:232, name:'8k-12k'},
                {value:124, name:'12k-15k'},
                {value:100, name:'15k-25k'},
                {value:59, name:'25k-50k'}
            ],
            itemStyle: {
                emphasis: {
                    shadowBlur: 10,
                    shadowOffsetX: 0,
                    shadowColor: 'rgba(0, 0, 0, 0.5)'
                }
            }
        }
    ],
    color: [
        'rgb(255, 219, 92)',
        'rgb(255, 174, 139)', 
        'rgb(55, 162, 218)', 
        'rgb(50, 197, 233)',
        'rgb(159, 230, 184)',
    ],
}
if (option && typeof option === "object") {
    myChart.setOption(option, true)
}

// 折线图

var dom2 = document.getElementById("containerline")
var myChart2 = echarts.init(dom2)
option2 = null
option2 =  {
    xAxis: {
        type: 'category',
        boundaryGap: false,
        data: [1, 2, 3, 4, 5, '6年+']
    },
   yAxis: {
        type: 'value',
        axisLabel: {
            formatter: '{value} K'
        },
        scale: true
    },
    series: [{
        data: [6,11,15,18,25,28],
        type: 'line',
        areaStyle: {}
    }],
    textStyle:{
        fontSize:15,
        color:'#fff',
    },
    color: [
        'rgb(159, 230, 184)',
    ],
}
if (option2 && typeof option2 === "object") {
    myChart2.setOption(option2, true)
}